import { Notification } from 'element-ui'
// import { RESPONSECODE, RESPONSEMSG, ROUTENAME } from 'services/constConfig.js'
// import localStorageService from 'store/localStorageService.js'
// import router from 'routes/config.js'

const NETWORKERROR_TITLE = '服务器错误'

export function showError (title, info) {
  Notification.error({
    title: title,
    message: info,
    offset: 100
  })
}

export function showInfo (title, info) {
  Notification.info({
    title: title,
    message: info,
    offset: 100
  })
}

export function showSuccess (title, info) {
  Notification.success({
    title: title,
    message: info,
    offset: 100
  })
}

export function showNetWorkError (error) {
  Notification.error({
    title: NETWORKERROR_TITLE,
    message: '' + error,
    offset: 100
  })
}
